#include "systemc.h"
#include "gen.h"

void gen::entry() {
  cycle++;
  // sending some reset values
  if (cycle<4) {
    rst_n.write(false);
    sample_vld.write(false);
  } else {
    rst_n.write(true);
    sample_vld.write( false );
    // sending normal mode values
    if (cycle%10==0) {
      sample_vld.write(true);
      sample.write( (int)send_value );
      cout << "Stimuli : " << (int)send_value << " at time "
	    << sc_time_stamp().to_double() << endl;
      send_value++;
    }
  }
}
